Skip to content

Conversation

mahmoud-moursy
Copy link
Contributor

Housekeeping to keep docs clean and up to date -- turned all instances of 0x1b_u8.into() into \x1b when I stumbled upon this in the Rust docs.

Tested these changes using this code:

fn main() {
    let esc: char = 0x1b_u8.into();
    let esc_2 = '\x1b';
    
    assert_eq!(esc, esc_2);
}

It exited and returned code 0.

Housekeeping to keep docs clean and up to date.
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 19, 2021
@ghost
Copy link

ghost commented Nov 19, 2021

There seem to be more occurrences in https://github.com/rust-lang/rust/blob/master/library/core/src/num/mod.rs like for example:

    /// let lf = b'\n';
    /// let esc = 0x1b_u8;
    ///

Do you want to turn those into b'\x1b'?

They are unnecessary as of Rust 2021

Co-authored-by: r00ster <[email protected]>
@mahmoud-moursy
Copy link
Contributor Author

Do you want to turn those into b'\x1b'?

I would love to, but traversing the entirety of Rust's source code to find these instances would take me a lot of time.

@ghost
Copy link

ghost commented Nov 19, 2021

@T-O-R-U-S there are actually not that many. Here's what I meant: #91044

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 19, 2021
Turn all 0x1b_u8 into '\x1b' or b'\x1b'

Supersedes rust-lang#91040
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 19, 2021
Turn all 0x1b_u8 into '\x1b' or b'\x1b'

Supersedes rust-lang#91040
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 19, 2021
Turn all 0x1b_u8 into '\x1b' or b'\x1b'

Supersedes rust-lang#91040
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 20, 2021
Turn all 0x1b_u8 into '\x1b' or b'\x1b'

Supersedes rust-lang#91040
@bors
Copy link
Collaborator

bors commented Nov 20, 2021

☔ The latest upstream changes (presumably #91064) made this pull request unmergeable. Please resolve the merge conflicts.

@apiraino apiraino added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Nov 22, 2021
@m-ou-se
Copy link
Member

m-ou-se commented Nov 23, 2021

Closing this, since #91044 has already been merged.

@m-ou-se m-ou-se closed this Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants